<?php

namespace App\Http\Requests;

class RoleRequest extends Request
{

	public function authorize()
	{
		return true;
	}

	public function rules()
	{
		return [
			'name' => 'required',
			'status' => 'in:1,2',
		];
	}

	/**
	 * 自定义错误信息
	 */
	public function messages()
	{
		return [
			'name.required' => '角色名必须',
			'status.in' => '状态值错误',
		];
	}
}